<div id="content">
  <h3 class="widgettitle"><span><?php echo $this->Html->link('Trang chủ',array('controller'=>'news','action'=>'home'));?> » Thư viện ảnh
 </span></h3>
     <table border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
         <tr>
            <?php 
           		 $i=0;
                 foreach($galleries as $item){
                    $i++;
            ?>
            <td width="190" align='center'>
                <div style="width: 185px; height: 149px; border: 1px #CCCCCC solid; padding:2px;text-align:center;">
                 <a href="<?php echo $this->webroot?>galleries/view/<?php echo $item['Gallery']['id']?>">
				 <?php 
				 if(is_file('files/uploads/gallery/'.$item['Img'][0]['url'])){
				 ?>
                 <img src="<?php echo $this->webroot;?>files/uploads/gallery/<?php echo $item['Img'][0]['url']; ?>" width="185" height="149">
                 <?php }else{?>
                 <img src="<?php echo $this->webroot;?>img/no-image.jpg" width="185" height="149">
                 <?php } ?>
                 </a>
                 </div>
                <div style="margin: 10px 5px 10px 8px;" align="left"><b><a href="<?php echo $this->webroot?>galleries/view/<?php echo $item['Gallery']['id']?>" class="link_text_14_xanh_dam" ><?php echo $item['Gallery']['name']?></a></b></div>
            </td>
            <?php if($i%3==0){?>
            </tr><tr>
            <?php }}?>
        </tr>
     </table>
 </div>
 <?php echo $this->element('news-right');?>